import { connect } from "react-redux";

import Index from "../component/Index.jsx";

import { realtimeSubscribe, realtimeUnSubscribe } from "../action/realtime";

export default connect((state) => ({
    connect: state.getIn(["realtime", "connect"]),
    tracing: state.getIn(["realtime", "tracing"]),
    message: state.getIn(["realtime", "message"])
}), (dispatch) => ({
    subscribe: (filter) => dispatch(realtimeSubscribe(filter)),
    unSubscribe: (filter) => dispatch(realtimeUnSubscribe(filter))
}))(Index);